﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoMapper;
using Finance.Entity;
using Finance.Poco;

namespace Finance.Dal
{
  public  class BaseDal
    {
      static BaseDal()
      {
          Mapper.CreateMap<UserEntity, User>();
          Mapper.CreateMap<User, UserEntity>();

          Mapper.CreateMap<ViewUserEntity, ViewUser>();
          Mapper.CreateMap<ViewUser, ViewUserEntity>();

          Mapper.CreateMap<BankCardEntity, BankCard>();
          Mapper.CreateMap<BankCard, BankCardEntity>();

          Mapper.CreateMap<AccountsTypeEntity, AccountsType>();
          Mapper.CreateMap<AccountsType, AccountsTypeEntity>();

          Mapper.CreateMap<ViewAccountsEntity, ViewAccounts>();
          Mapper.CreateMap<ViewAccounts, ViewAccountsEntity>();

          Mapper.CreateMap<OrgEntity, Org>();
          Mapper.CreateMap<Org, OrgEntity>();

          Mapper.CreateMap<AccountsEntity, Accounts>();
          Mapper.CreateMap<Accounts, AccountsEntity>();

          Mapper.CreateMap<SaleDataEntity, SaleData>();
          Mapper.CreateMap<SaleData, SaleDataEntity>();
      }
     protected Dos.ORM.DbSession dbSession = new Dos.ORM.DbSession("finance");
    }
}
